package com.limao.Tencent.tenpay.pay;

import com.limao.Tool.CacheClass;

public class TenpayConfig {
	/**
	 * 商家可以考虑读取配置文件
	 */
	
	//初始化
	public static String AppSecret="4047a71e17d73df3b086040a53838e82";
	public static String APP_ID = "wxc24ee5d41a590d10";//"wx0d888b2b8005ac10";//"wxf0e25f923ebf63a9";//微信开发平台应用id
	//public static String APP_KEY ="65afc2b4ea6f67d4f4b8b22456e8c392";//"a0e89c19a1f53dba61c848e75db857b7";
	public static String APP_KEY ="c53cbc3a897d44c9a38a3da4c1c65e6c";//"c53cbc3a897d44c9a38a3da4c1c65e6b";
	
	
	
	public static String getAppSecret()
	{
		
		AppSecret=CacheClass.getSYS_BaseDataCacheManager().Load_Param("wxAppSecret").trim();
		if(CacheClass.isEmpty(AppSecret))
		{
			AppSecret="4047a71e17d73df3b086040a53838e82";
		}
		return AppSecret;
	}
	public static String getAPP_ID()
	{
		
		APP_ID=CacheClass.getSYS_BaseDataCacheManager().Load_Param("wxAPP_ID").trim();
		if(CacheClass.isEmpty(APP_ID))
		{
			APP_ID="wxc24ee5d41a590d10";
		}
		return APP_ID;
	}
	public static String getAPP_KEY()
	{
		
		APP_KEY=CacheClass.getSYS_BaseDataCacheManager().Load_Param("wxAPP_KEY").trim();
		if(CacheClass.isEmpty(APP_KEY))
		{
			APP_KEY="c53cbc3a897d44c9a38a3da4c1c65e6c";
		}
		return APP_KEY;
	}
	
	public static String getMCH_ID()
	{
		MCH_ID=CacheClass.getSYS_BaseDataCacheManager().Load_Param("wxMCH_ID").trim();
		if(CacheClass.isEmpty(MCH_ID))
		{
			MCH_ID="1331934901";
		}
		return MCH_ID;
	}
	
	
	public static String getShareAppSecret()
	{
		
		String shareAppSecret=CacheClass.getSYS_BaseDataCacheManager().Load_Param("wxShareAppSecret").trim();
		if(CacheClass.isEmpty(shareAppSecret))
		{
			shareAppSecret="a0e89c19a1f53dba61c848e75db857b7";
		}
		return shareAppSecret;
	}
	public static String getShareAPP_ID()
	{
		
		String shareAppid=CacheClass.getSYS_BaseDataCacheManager().Load_Param("wxShareAPP_ID").trim();
		if(CacheClass.isEmpty(shareAppid))
		{
			shareAppid="wxf0e25f923ebf63a9";
		}
		return shareAppid;
	}

	
	
	public static String MCH_ID = "1331934901";//"1307877001";//"1266695301";//财付通商户号
	public static String GATEURL ="https://api.mch.weixin.qq.com/pay/unifiedorder";

//	public static String TOKENURL = "https://api.weixin.qq.com/cgi-bin/token";//获取access_token对应的url
	public static String GRANT_TYPE = "client_credential";//常量固定值 
	public static String EXPIRE_ERRCODE = "42001";//access_token失效后请求返回的errcode
	public static String FAIL_ERRCODE = "40001";//重复获取导致上一次获取的access_token失效,返回错误码
	//public static String GATEURL = "https://api.weixin.qq.com/pay/genprepay?access_token=";//获取预支付id的接口url

	public static String ACCESS_TOKEN = "access_token";//access_token常量值
	public static String ERRORCODE = "errcode";//用来判断access_token是否失效的值
	//public static String SIGN_METHOD = "sha1";//签名算法常量值
	public static String notify_url = CacheClass.getDomain()+"admin/notify_url.jsp";//

	//package常量值
	//public static String packageValue = "bank_type=WX&body=%B2%E2%CA%D4&fee_type=1&input_charset=GBK&notify_url=http%3A%2F%2F127.0.0.1%3A8180%2Ftenpay_api_b2c%2FpayNotifyUrl.jsp&out_trade_no=2051571832&partner=1900000109&sign=10DA99BCB3F63EF23E4981B331B0A3EF&spbill_create_ip=127.0.0.1&time_expire=20131222091010&total_fee=1";
	//public static String traceid = "testtraceid001";//测试用户id
}
